package org.lex.notepad.ui.action.edit;

import java.awt.event.ActionEvent;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;

import javax.swing.JDialog;
import javax.swing.KeyStroke;

import org.lex.notepad.ui.action.BaseNotepadAction;
import org.lex.notepad.ui.search.FindDialog;

public class FindAction extends BaseNotepadAction {
	public FindAction() {
		super();
		this.setName("Find...");
		this.setAcceleratorKey(KeyStroke.getKeyStroke(KeyEvent.VK_F, InputEvent.CTRL_MASK, false));
	}

	public void actionPerformed(ActionEvent e) {
		JDialog find = new FindDialog();
		find.setLocationRelativeTo(notepad.getRootWindow());
		find.setVisible(true);
	}
}
